{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>编辑</h5>
                </div>
                <div class="ibox-content layui-form">
                    <div class="layui-row layui-col-space10 layui-form-item ">
                        <input type="hidden" name="id" value="{$info['id']}">

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">联系人名字：</label>
                            <div class="layui-input-block">
                                <input type="text" name="name"  value="{$info['name']}" lay-verify="required"  class="layui-input ">
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">联系人电话：</label>
                            <div class="layui-input-block">
                                <input type="text" name="phone"  value="{$info['phone']}" lay-verify="required"  class="layui-input ">
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">性别：</label>
                            <div class="layui-input-block">
                                <input type="text" name="sex"  value="{$info['sex']}" lay-verify="required"  class="layui-input ">
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">城市：</label>
                            <div class="layui-input-block">
                                <input type="text" name="city"  value="{$info['city']}" lay-verify="required"  class="layui-input ">
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">小区：</label>
                            <div class="layui-input-block">
                                <input type="text" name="xiaoqu"  value="{$info['xiaoqu']}" lay-verify="required"  class="layui-input ">
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">楼栋房号：</label>
                            <div class="layui-input-block">
                                <input type="text" name="house"  value="{$info['house']}" lay-verify="required"  class="layui-input ">
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">期望出售(万)：</label>
                            <div class="layui-input-block">
                                <input type="text" name="money"  value="{$info['money']}" lay-verify="required"  class="layui-input ">
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">提交时间：</label>
                            <div class="layui-input-block">
                                <input type="text" name="time" disabled value="{$info['time']}" lay-verify="required"  class="layui-input ">
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">处理状态：</label>
                            <div class="layui-input-block" style="width: 150px">
                                <select name="status" lay-search="">
                                    <option  value="1" {if $info['status']==1} selected {/if}>未处理</option>
                                    <option  value="2" {if $info['status']==2} selected {/if}>已处理</option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">备注：</label>
                            <div class="layui-input-block">
                                <textarea name="remark"   style="width:380px;height:200px" lay-verify="required"  class="layui-input ">{$info['remark']}</textarea>
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit="" lay-filter="component-form-element">保存
                                </button>
                                <button class="layui-btn layui-btn-primary" onclick="history.go(-1)">关闭</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
<script>
//    wk.uploadImg({size:5,type:'png,jpg,jpeg',url:"{:url('Upload/upload')}",domain:""});
    layui.use(['form','upload','layedit'], function() {
        var form = layui.form;
        form.on('submit(component-form-element)', function (data) {
            $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
//            data.field.content = editor.txt.html();
            $.ajax({
                url:"{:url('updatemf')}",
                type:'post',
                dataType:'json',
                data:data.field,
                success:function(res){
                    if (res.code == 200) {
                        wk.success(res.msg,"{:url('Form/formmf')}")
                    } else {
                        wk.error(res.msg,'','$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\');');
                    }
                }
            })
        });
    });
</script>
</body>
</html>
